import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { SkFansUserVO, SkFansUserForm, SkFansUserQuery } from '@/api/app/SkFansUser/types';

/**
 * 查询粉丝列列表
 * @param query
 * @returns {*}
 */

export const listSkFansUser = (query?: SkFansUserQuery): AxiosPromise<SkFansUserVO[]> => {
  return request({
    url: '/app/SkFansUser/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询粉丝列详细
 * @param id
 */
export const getSkFansUser = (id: string | number): AxiosPromise<SkFansUserVO> => {
  return request({
    url: '/app/SkFansUser/' + id,
    method: 'get'
  });
};

/**
 * 新增粉丝列
 * @param data
 */
export const addSkFansUser = (data: SkFansUserForm) => {
  return request({
    url: '/app/SkFansUser',
    method: 'post',
    data: data
  });
};

/**
 * 修改粉丝列
 * @param data
 */
export const updateSkFansUser = (data: SkFansUserForm) => {
  return request({
    url: '/app/SkFansUser',
    method: 'put',
    data: data
  });
};

/**
 * 删除粉丝列
 * @param id
 */
export const delSkFansUser = (id: string | number | Array<string | number>) => {
  return request({
    url: '/app/SkFansUser/' + id,
    method: 'delete'
  });
};
